//
//  DesitionCell.m
//  Travel
//
//  Created by 吴品泽 on 15/4/8.
//  Copyright (c) 2015年 &#21556;&#21697;&#27901;. All rights reserved.
//

#import "DesitionCell.h"

@implementation DesitionCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.myimageView = [[UIImageView alloc]init];
        self.contreLabel = [[UILabel alloc]init];
        self.pinyingLabel = [[UILabel alloc]init];
        self.destLabel = [[UILabel alloc]init];
        self.backLabel = [[UILabel alloc]init];
        self.contreLabel.textColor = [UIColor whiteColor];
        self.pinyingLabel.textColor = [UIColor whiteColor];
        self.destLabel.textColor = [UIColor whiteColor];
        
        [self.contentView addSubview:self.myimageView];
        [self.myimageView addSubview:self.backLabel];
        [self.myimageView addSubview:self.contreLabel];
        [self.myimageView addSubview:self.pinyingLabel];
        [self.myimageView addSubview:self.destLabel];
        
    }
    
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.myimageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    self.contreLabel.frame = CGRectMake(15, 5, self.myimageView.frame.size.width - 15, 30);
    self.pinyingLabel.frame = CGRectMake(15,30,self.myimageView.frame.size.width * 3 / 4, 20);
    self.destLabel.frame = CGRectMake(self.myimageView.frame.size.width / 4, self.myimageView.frame.size.height - 30, self.myimageView.frame.size.width / 2, 20);
    self.backLabel.center = self.destLabel.center;
  //  self.backLabel.frame = CGRectMake(self.myimageView.frame.size.width / 4, self.myimageView.frame.size.height - 35, self.myimageView.frame.size.width *
//                                    2 / 4, 25);
    
//    self.myimageView.backgroundColor = [UIColor yellowColor];
//    self.contreLabel.backgroundColor = [UIColor redColor];
//    self.pinyingLabel.backgroundColor = [UIColor blackColor];
//    self.destLabel.backgroundColor = [UIColor greenColor];
    self.backLabel.frame = CGRectMake(0, 0, self.myimageView.frame.size.width,  self.myimageView.frame.size.height);
    self.backLabel.backgroundColor = [UIColor blackColor];
    self.backLabel.alpha = 0.2;
    
}


@end
